/*
* $Id: TableCelRow.h 152 2010-09-23 18:28:55Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _TABLE_CEL_ROW_H_
#define _TABLE_CEL_ROW_H_

#include "TableStructs.h"

class CTableCel;

class CTableCelRow
{
	std::vector<CTableCel*> m_aCels;
	int m_posY;
	int m_nCy;
	int m_nId;
	int m_nType;
protected:
	void GetXmlCy();
	void SetXmlCy();
public:
	CTableCelRow* m_pNext;
	CTableCelRow* m_pBack;
public:
	CTableCelRow(int nId, int nType);
	CTableCelRow(const CTableCelRow& row);
	~CTableCelRow();
	void operator = (const CTableCelRow& row);
public:
	void AddCel(tableHeader* pHeader, const std::tstring& strValue);
	void SetPosY(int posY);
	void SetCY(int cy);
	int GetCY();
	int GetId();
	int GetYPos();
	void Select(bool bSel);
	bool Paint(CDC* dc, CRect rect);
	std::tstring GetValueColumn(int nId);
	TypeField::type GetTypeColumn(int nId);
	bool IsSetCursor(CPoint pos);
};

#endif/*_TABLE_CEL_ROW_H_*/